﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using VirtualPress.Infrastructure.Entities.Repository;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Data.Entity.Migrations;
using System.Data.Entity.Infrastructure;
using VirtualPress.Infrastructure.Entities.Entity;

namespace VirtualPress.Infrastructure.Entities
{
    public class Context : DbContext
    {
        public Context()
            :base("name=Context")
        {
           Database.SetInitializer<Context>(null);
        }
        public DbSet<T_User> User { get; set; }
        public DbSet<T_News> News { get; set; }
        public DbSet<T_Author> Author { get; set; }
        public DbSet<T_Periodical> Periodical { get; set; }
        public DbSet<T_Meeting> Meeting { get; set; }
        public DbSet<T_PeriodicalItem> PeriodicalItem { get; set; }
        public DbSet<C_ImportantPan> ImportantPan { get; set; }
        //public DbSet<T_MeetingItem> MeetingItem { get; set; }
        public DbSet<T_MagazineItem> MagazineItem { get; set; }
        public DbSet<T_Article> Article { get; set; }
        public DbSet<T_ArticleHistory> ArticleHistory { get; set; }
        public DbSet<T_ArticleAuthor> ArticleAuthor { get; set; }
        public DbSet<T_AuditingRecord> AuditingRecord { get; set; }
        public DbSet<T_Appendix> Appendix { get; set; }
        public DbSet<T_Organization> Organization { get; set; }
        public DbSet<T_FriendLink> FriendLink { get; set; }
        public DbSet<T_Expert> Expert { get; set; }
        public DbSet<Invite> Invite { get; set; }
        public DbSet<T_Reckoning> Reckoning { get; set; }
        public DbSet<T_BillStream> BillStream { get; set; }
        public DbSet<B_Book> Book { get; set; }
        public DbSet<T_PublishApply> PublishApply { get; set; }
        public DbSet<StreamNo> StreamNo { get; set; }
        public DbSet<C_ConferenceMapping> ConferenceMapping { get; set; }
        public DbSet<T_Download> Download { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();//移除复数表名的契约
        }
    }
}
